import service from '@/server'

export const dictTypePage = (params) => {
    return service({
        url: '/system/dict/type/page',
        method: 'get',
        params,
        setting: {
            json: true,
            isToken: true
        }
    })
}

export const dictTypeGet = (params) => {
    return service({
        url: '/system/dict/type/get',
        method: 'get',
        params,
        setting: {
            json: true,
            isToken: true
        }
    })
}

export const dictTypeCreate = (params) => {
    return service({    
        url: '/system/dict/type/create',
        method: 'post',
        data: params,
        setting: {
            json: true,
            isToken: true
        }
    })
}

export const dictTypeUpdate = (params) => {
    return service({
        url: '/system/dict/type/update',
        method: 'put',
        data: params,
        setting: {
            json: true,
            isToken: true
        }
    })
}

export const dictTypeDelete = (params) => {
    return service({
        url: '/system/dict/type/delete',
        method: 'delete',
        params,
        setting: {
            json: true,
            isToken: true
        }
    })
}

export const dictItemPage = (params) => {
    return service({
        url: '/system/dict/item/page',
        method: 'get',
        params,
        setting: {
            json: true,
            isToken: true
        }
    })
}       

export const dictItemCreate = (params) => {
    return service({
        url: '/system/dict/item/create',
        method: 'post',
        data: params,
        setting: {
            json: true,
            isToken: true
        }
    })
}

export const dictItemUpdate = (params) => {
    return service({
        url: '/system/dict/item/update',
        method: 'put',
        data: params,
        setting: {
            json: true,
            isToken: true
        }
    })
}   

export const dictItemDelete = (params) => {
    return service({
        url: '/system/dict/item/delete',
        method: 'delete',
        params,
        setting: {
            json: true,
            isToken: true
        }
    })
}